#@layout()
#define main()
<h1>机票管理&nbsp;&nbsp;
    #if(session.user.role==2)
    <a href="/flighttickets/add">创建机票</a>
    #end
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="8%" style="text-align:center;">机票编号</th>
            <th width="8%" style="text-align:center;">航班编号</th>
            <th width="8%" style="text-align:center;">飞机编号</th>
            <th width="11%" style="text-align:center;">航班开始时间</th>
            <th width="11%" style="text-align:center;">航班结束时间</th>
            <th width="10%" style="text-align:center;">航班起点</th>
            <th width="10%" style="text-align:center;">航班终点</th>
            <th width="5%" style="text-align:center;">机票类型</th>
            <th width="8%" style="text-align:center;">机票单价</th>
            <th width="8%" style="text-align:center;">机票数量</th>
            <th width="18%" style="text-align:center;">操作</th>
        </tr>

        #for(x : flightticketsPage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.flightticketsno)</td>
            <td style="text-align:center;">#(x.airno)</td>
            <td style="text-align:center;">#(x.flighttimeno)</td>
            <td style="text-align:center;">#(x.begindate)</td>
            <td style="text-align:center;">#(x.enddate)</td>
            <td style="text-align:center;">#(x.begin)</td>
            <td style="text-align:center;">#(x.end)</td>
            <td style="text-align:center;">
                #if(x.tickettype == 0)
                   经济仓票
                #else
                   商务仓票
                #end
            </td>
            <td style="text-align:center;">#(x.price)</td>
            <td style="text-align:center;">#(x.num)</td>
            <td style="text-align:center;">
                #if(session.user.role==2)
                &nbsp;<a href="/flighttickets/delete/#(x.id)">删除</a>
                &nbsp;<a href="/flighttickets/edit/#(x.id)">修改</a>
                #end
                <!--#if(session.user.role==3)
                &nbsp;<a href="/buyrecord/add/#(x.id)">订票</a>
                #end-->
            </td>
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(flightticketsPage.pageNumber, flightticketsPage.totalPage, "/flighttickets/")
</div>
#end